function Coder(name, age) {
  this.name = name
  this.age = age
  this.career = 'coder'
  this.work = ['写代码', '改bug', '跟产品吵架']
}

function ProductManger(name, age) {
  this.name = name
  this.age = age
  this.career = 'product manage'
  this.work = ['订会议室', '写PRD', '催更']
}

function Fatory(name, age, career) {
  switch (career) {
    case 'coder':
      return new Coder(name, age)
      break
    case 'product manage':
      return new ProductManger(name, age)
      break
  }
}

